/* 公共样式文件 */
body {
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.layui-btn-sm {
    font-size: 14px;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-active {
    background-color: #52c41a;
}

.status-inactive {
    background-color: #f5222d;
}

.status-syncing {
    background-color: #1890ff;
}

/* 账户配置表单样式 */
.account-config-form .layui-form-item {
    position: relative;
    margin-bottom: 25px;
}

.account-config-form .form-label {
    position: absolute;
    top: 12px;
    left: 15px;
    color: #999;
    transition: all 0.2s ease;
    pointer-events: none;
    background-color: #fff;
    padding: 0 5px;
    z-index: 1;
}

.account-config-form .layui-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    padding: 20px 15px 10px 15px;
    height: 50px;
    line-height: 1.5;
    transition: all 0.3s;
}

.account-config-form .layui-input:focus,
.account-config-form .layui-input:not(:placeholder-shown) {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.account-config-form .layui-input-block {
    margin-left: 0;
    position: relative;
}

.account-config-form .layui-input:focus ~ .form-label,
.account-config-form .layui-input:not(:placeholder-shown) ~ .form-label {
    top: -8px;
    left: 10px;
    font-size: 12px;
    color: #1890ff;
}

/* 端口输入框样式 */
.account-config-form .layui-input-inline {
    position: relative;
    display: inline-block !important;
    width: 120px !important;
    max-width: 120px !important;
}

.account-config-form .layui-input-inline .layui-input {
    padding: 20px 10px 10px 10px;
}

.account-config-form .layui-input-inline .form-label {
    left: 10px;
}

/* 开关按钮垂直居中 */
.account-config-form .layui-form-mid {
    vertical-align: middle;
}

/* 手机端保持端口输入框宽度 */
@media screen and (max-width: 1000px) {
    .account-config-form .layui-input-inline {
        display: inline-block !important;
        width: 120px !important;
        max-width: 120px !important;
    }
}
